# Backslash escapes

Any ASCII punctuation character may be backslash-escaped:

Example 308

Markdown HTML Demo
\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~

<p>!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^_`{|}~</p>

Backslashes before other characters are treated as literal backslashes:

Example 309

Markdown HTML Demo
\→\A\a\ \3\φ\«

<p>\→\A\a\ \3\φ\«</p>

Escaped characters are treated as regular characters and do not have their usual Markdown meanings:

Example 310

Markdown HTML Demo
\*not emphasized*
\<br/> not a tag
\[not a link](/foo)
\`not code`
1\. not a list
\* not a list
\# not a heading
\[foo]: /url "not a reference"
\&ouml; not a character entity

<p>*not emphasized*
&lt;br/&gt; not a tag
[not a link](/foo)
`not code`
1. not a list
* not a list
# not a heading
[foo]: /url &quot;not a reference&quot;
&amp;ouml; not a character entity</p>

If a backslash is itself escaped, the following character is not:

Example 311

Markdown HTML Demo
\\*emphasis*

<p>\<em>emphasis</em></p>

A backslash at the end of the line is a hard line break (opens new window):

Example 312

Markdown HTML Demo
foo\
bar

<p>foo<br />
bar</p>

Backslash escapes do not work in code blocks, code spans, autolinks, or raw HTML:

Example 313

Markdown HTML Demo
`` \[\` ``

<p><code>\[\`</code></p>

Example 314

Markdown HTML Demo
    \[\]

<pre><code>\[\]
</code></pre>

Example 315

Markdown HTML Demo
~~~
\[\]
~~~

<pre><code>\[\]
</code></pre>

Example 316

Markdown HTML Demo
<http://example.com?find=\*>

<p><a href="http://example.com?find=%5C*">http://example.com?find=\*</a></p>

Example 317

Markdown HTML Demo
<a href="/bar\/)">

<a href="/bar\/)">

But they work in all other contexts, including URLs and link titles, link references, and info strings (opens new window) in fenced code blocks (opens new window):

Example 318

Markdown HTML Demo
[foo](/bar\* "ti\*tle")

<p><a href="/bar*" title="ti*tle">foo</a></p>

Example 319

Markdown HTML Demo
[foo]

[foo]: /bar\* "ti\*tle"

<p><a href="/bar*" title="ti*tle">foo</a></p>

Example 320

Markdown HTML Demo
``` foo\+bar
foo
```

<pre><code class="language-foo+bar">foo
</code></pre>